<template>
  <div>
    <van-nav-bar fixed left-arrow placeholder :title="name" @click-left="onClickLeft" />
    <div class="jobDetail">
      <div class="detailInfo">
        <div class="jobSalary">
          <div class="position">
            {{ detailData.title }}
          </div>
          <div class="salar">
            {{ detailData.salary }}
          </div>
        </div>
        <div class="jobInfo">
          <div class="jobInfoDetail">
            <div v-for="(item, idx) in detailData.ask" :key="idx" class="askItem">
              <div>{{ item }}</div>
              <span>·</span>
            </div>
          </div>
        </div>
        <div class="jobDescript">
          <div class="jobTitle">
            职位描述
          </div>
          <div class="jobCon">
            <div v-for="(item, idx) in detailData.job" :key="idx" class="jobItem">
              {{ item }}
            </div>
          </div>
        </div>
        <div class="jobRespone">
          <div class="responeTitle">
            工作职责：
          </div>
          <div class="responeCon">
            <div v-for="(item, idx) in detailData.detail" :key="idx" class="infoItem">
              {{ item }}
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="jobFoot">
      <div class="footIcon">
        <!-- <div> -->
        <img src="@/static/photo.png" alt="" />
        <span>面试预约</span>
        <!-- </div> -->
      </div>
      <div class="footBtn">
        <van-button block>
          立即投递
        </van-button>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  components: {},
  data() {
    return {
      detailData: {
        title: '中高级前端开发工程师',
        salary: '9-14K',
        ask: ['大专', '1-3年', 'Web端', '移动端'],
        job: ['Web端', 'PC端', '移动端', 'HTML', 'CSS', 'JS', 'Vue'],
        detail: ['1.负责产品WEB前端表现层与前后端交互', '2.负责产品前端架构设计和标准规范制定；实现各种交互效果'],
      },
    }
  },
  onLoad(option) {
    this.name = option.name
    console.log(option, '详情')
  },
  mounted() {

  },
  methods: {
    // 返回上一级
    onClickLeft() {
      uni.navigateBack() // 直接使用 navigateBack
    },
  },
}
</script>
<style lang="scss" scoped>
.jobDetail{
  margin-bottom: 66px;
  .detailInfo{
    width: 93%;
    margin: 0 auto;
    box-shadow: 0px 0px 4px 0px rgba(0,0,0,0.06);
    border-radius: 4px;
    margin-top: 10px;
    .jobSalary{
      font-size: 14px;
      font-weight: 400;
      color: #000000;
      line-height: 20px;
      letter-spacing: 1px;
      display: flex;
      justify-content: space-between;
      padding:18px 10px 5px 10px;
      .position{
        color:#000;
        font-size: 16px;
        font-weight: 600;
      }
      .salar{
       color:#739ECA;
       font-size: 16px;
       font-weight: 600;
      }
    }
  }
  .jobInfo{
    padding-bottom: 10px;
    .jobInfoDetail{
      display: flex;
      border-bottom: 1px solid #F4F4F4;
      margin-bottom: 20rpx;
      width: 93%;
      margin: 0 auto;
      padding-bottom: 7px;
      .askItem{
      display: flex;
      color:#666;
      div{
        font-size: 12px;
      }
      span{
        font-size: 14px;
        padding: 0px 2px;
      }
    }
    }
  }
  .jobDescript{
    padding-bottom: 10px;
    .jobTitle{
      font-size: 16px;
      color:#000;
      font-weight: 600;
      padding:0px 10px 5px 10px;
    }
    .jobCon{
      font-size: 12px;
      font-weight: normal;
      color: #666;
      line-height: 10px;
      display: flex;
      align-items: center;
      padding:0px 10px 5px 10px;
      margin-top:5px;
      .jobItem{
        background:#F5F7F7;
        padding: 4px 5px 4px 5px;
        margin-right: 5px;
        border-radius: 2px;
      }
    }
  }
}
.jobFoot{
    width: 100%;
    height:66px;
    position: absolute;
    bottom: 0px;
    left: 0px;
    display: flex;
    box-shadow: 0px 0px 4px 0px rgba(0,0,0,0.06);
  .footIcon{
    width:30%;
    display: flex;
    flex-flow: column;
    align-items: center;
    justify-content: center;
    img{
      width: 24px;
      height:24px;
    }
    span{
      color:#333;
    }
  }
  .footBtn{
    display: flex;
    align-items: center;
    justify-content: center;
    width:70%;
    van-button{
      width: 80%;

    }
  }
}
</style>
<style lang="scss">
.footBtn{
  .van-button--block {
    background: linear-gradient(to bottom, #739ECA , #ABCDE7) !important;
    color: #fff !important;
    font-size: 16px !important;
    border-radius: 6px !important;
  }
}
</style>
